USE [NGroup_VTL_DB]
GO

/****** Object:  StoredProcedure [dbo].[UpdateGenericType]    Script Date: 5/30/2015 2:44:18 PM ******/
DROP PROCEDURE [dbo].[UpdateGenericType]
GO

/****** Object:  StoredProcedure [dbo].[UpdateGenericType]    Script Date: 5/30/2015 2:44:18 PM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

-- =============================================
-- Author:		Nguyen Vu Nam
-- Create date: 20140111
-- Description:	Update news
-- =============================================
CREATE PROCEDURE [dbo].[UpdateGenericType]
	@ID						INT,
	@Descriptions			NVARCHAR(500),
	@Descriptions_En		NVARCHAR(500),	
	@LastUpdatedAt			DATETIME,
	@LastUpdatedBy			NVARCHAR(50),
	@MetaDescriptions		NVARCHAR(1500),
	@MetaDescriptions_En	NVARCHAR(1500),
	@MetaKeywords			NVARCHAR(1500),
	@MetaKeywords_En		NVARCHAR(1500),
	@Rowcount				INT = -1 OUTPUT

AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;
	BEGIN
		UPDATE [NGroup_VTL_DB].[dbo].[GenericTypes]
		   SET [Descriptions]		= @Descriptions
			  ,[Descriptions_En]	= @Descriptions_En			  
			  ,[LastUpdatedAt]		= @LastUpdatedAt
			  ,[LastUpdatedBy]		= @LastUpdatedBy
			  ,[MetaDescription]	= @MetaDescriptions
			  ,[MetaDescription_En] = @MetaDescriptions_En
			  ,[MetaKeyword]		= @MetaKeywords
			  ,[MetaKeyword_En]		= @MetaKeywords_En
		 WHERE [ID]	= @ID
	 END
	 SELECT @Rowcount = @@ROWCOUNT
END


GO


